<?php 
// wymagane w layout
echo $this->Section->main();
?>

<?php if($session->check('Auth.User.id')){?>
<?php		
echo $javascript->codeBlock("
	$(document).ready(function(){
		$(\".actions a[rel^='prettyPhoto']\").prettyPhoto({animationSpeed:'slow',theme:'facebook',slideshow:8000,autoplay_slideshow:false,overlay_gallery:false});
	});		
",$options = array('allowCache'=>false,'safe'=>false,'inline'=>false));
?>
<?php }?>

<div class="content">
	<div class="content-left">
		<h2><?php __d("store","Kategorie")?></h2>
		<?php echo $this->Store->categories()?>
	</div>
	
	<div class="body-content">
		<h2 class="red"><?php __d("store","Nowosci")?></h2>
		<?php echo $this->element('store',array('plugin' => 'store',
			'items'=>$this->Store->products(2,array('limit'=>3))
			,'group_id'=>2
			,'params'=>array('width'=>128,'height'=>160,'padding'=>10,'margin'=>5,'border'=>1)
			));?>
			
		<h2 class="red"><?php __d("store","Promocje")?></h2>
		<?php echo $this->element('store',array('plugin' => 'store',
			'items'=>$this->Store->products(1,array('limit'=>3))
			,'group_id'=>1
			,'params'=>array('width'=>128,'height'=>160,'padding'=>10,'margin'=>5,'border'=>1)
			));?>	

		<h2 class="green"><?php __d("store","Przecena")?></h2>
		<?php echo $this->Section->generate(2);?>
		<?php echo $this->element('store',array('plugin' => 'store',
			'items'=>$this->Store->products(3,array('limit'=>3))
			,'group_id'=>3
			,'params'=>array('width'=>128,'height'=>160,'padding'=>10,'margin'=>5,'border'=>1)
			));?>
	</div>
	
	<div class="content-right">
		<?php echo $this->element('login')?>
		
		<h2><?php __d("store","Koszyk")?></h2>
		<div class="content-right-body"><?php echo $this->Store->cart_info();?></div>
		<div class="clr"></div>	
		
		<?php $form = $this->Store->currency();?>
		<?php if(!is_null($form)){?>
		<h2><?php __d("store","Currency")?></h2>
		<?php echo $form;?>
		<?php }?>
		<div class="clr"></div>	

	</div>	

	<div class="clr"></div>	
	<?php if($session->check('Auth.User.id')){?>
	<?php echo $this->element('toolbar_actions_main',array('plugin'=>'store','toolbar'=>'product'))?>
	<?php }?>	
	
</div>
<div class="clr"></div>		